package org.wlc.demov1;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @author 王立朝
 * @date 2022/5/10
 * @description: 观察者对象： 学生的姑姑
 */
public class Gugu implements Visitor {

    private static final Logger logger = LoggerFactory.getLogger(Gugu.class);


    /**
     * 访问学生信息
     *
     * @param student
     */
    @Override
    public void visit(Student student) {
        logger.info("孩子还健康吗？有没有受到欺负 :" + student.name + " " + student.clazz + " " + student.identity);
    }

    /**
     * 访问老师信息
     *
     * @param teacher
     */
    @Override
    public void visit(Teacher teacher) {
      logger.info("老师有没有体罚学生？"+ teacher.name+" "+ teacher.clazz +" "+ teacher.identity);
    }
}
